using System;

namespace Conusic
{
    [Serializable]
    public class CaptchaException : ApplicationException
    {
    }
    [Serializable]
    public class WrongUserNameOrPassword : ApplicationException
    {
    }
    [Serializable]
    public class SavedCookieErrorException : ApplicationException
    {
    }
    [Serializable]
    public class GraffitiUploadException : Exception
    {
    }

    [Serializable]
    public class ParseException : ApplicationException
    {
        private readonly string description = String.Empty;

        public ParseException(string message) : base(message)
        {
            description = String.Format("Parse Exception: {0}", message);
        }

        public ParseException()
        {
            description = "Parsing exception";
        }

        public override string ToString()
        {
            return description;
        }
    }
    [Serializable]
    public class ParseHashFailException : ParseException
    {
        private readonly string page;

        public ParseHashFailException(string page)
        {
            this.page = page;
        }

        public override string ToString()
        {
            return string.Format("[ParseHashFailException Page={0}]", page);
        }
    }
    [Serializable]
    public class ParseMediaIdFailException : ParseException
    {
        private readonly string page;

        public ParseMediaIdFailException(string page)
        {
            this.page = page;
        }

        public override string ToString()
        {
            return string.Format("[ParseMediaIdFailException Page={0}]", page);
        }
    }
}